<template>
    <p>小明的学习评定等级为：</p>
    <p>
        <span v-if="level === 'A'">优秀</span>
        <span v-else-if="level === 'B'">良好</span>
        <span v-else-if="level === 'C'">及格</span>
    </p>
    <select v-model="level">
        <option value="A">优秀</option>
        <option value="B">良好</option>
        <option value="C">及格</option>
    </select>
</template>
<script setup>
    import { ref } from 'vue'
    const level = ref('C')
</script>
<style>
</style>